package com.startech.controller;

import com.startech.common.domain.vo.Result;
import com.startech.domain.Recommend;
import com.startech.vo.RecommendVO;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RestController
@RequestMapping("/recommend")
@Api(tags = "Recommend相关接口")
@RequiredArgsConstructor
public class RecommendController {
//    @GetMapping
    @PostMapping
    public Result getRecommend(Integer userId, Integer limit) {

        Recommend recommend1 = new Recommend(203, "垂径定理综合题", 0.72f);
        Recommend recommend2 = new Recommend(115, "一元二次方程根与系数", 0.68f);
        RecommendVO recommendVO=new RecommendVO();
        recommendVO.setRecommends(Arrays.asList(recommend1, recommend2));
        return Result.success(recommendVO);
    }
}
